class A
{
public:
	A()
	{
		cout << "A's constructor" << endl;
	}


	~A()
	{
		cout << "A's destructor" << endl;
	}

	void show()
	{
		cout << "num:" << num << endl;
	}

private:
	int num=3;
};




int main()
{

	char mem[100];
	mem[0] = 'A';
	mem[1] = '\0';
	mem[2] = '\0';
	mem[3] = '\0';
	cout << (void*)mem << endl;  //输出的是首地址
	A* pv = new (mem)A; 
	cout << pv << endl;//输出的是首地址
	pv->show();
	pv->~A();
	getchar();
}